Repository navigation
fix(aggregator): isProjectPoolItem requires positive-integer number (#3514) - #4478
Conversation
…3514) The number gate used a bare typeof check, admitting 1.5, -3, 0, NaN and Infinity; consumers render the number verbatim as repo#number references, so one corrupt feed item fabricated cross-references. Require Number.isInteger(number) && number > 0 so invalid items drop individually in poolFromFeed while the section survives. Regression test covers the five rejected values plus the valid control, following the existing projects/feed gate test pattern.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 56 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Verification clarification: the targeted feed/projects tests pass (74/74). The full aggregator suite reported a failure in and an import error for missing package ; I reproduced the failure on clean , but did not independently verify the error there. Both are unrelated to this diff. The task is parked while the basic PR check remains pending. |
|
Verification correction: targeted feed/projects tests pass (74/74). The full aggregator suite reported a brief-surfaces test failure and an import error for missing package web-push. The brief-surfaces failure reproduces on clean origin/main; the package error was not independently verified there. Both are unrelated to this diff. Task 6137 is parked while the basic PR check remains pending. |
Closes #3514.
The number gate in
isProjectPoolItem(pm-stack/aggregator/src/projects.ts) used a baretypeof === 'number'check, admitting 1.5, -3, 0, NaN and Infinity. Consumers render the number verbatim asrepo#numberreferences, so one corrupt feed item fabricated cross-references instead of dropping. The gate now requiresNumber.isInteger(number) && number > 0; invalid items drop individually inpoolFromFeedwhile the section survives.Scope honored: labels-field work (#2418) untouched; no
render.tschanges.Tests
test/feed.test.ts(gate describe, aggregator(projects): isProjectPoolItem accepts any number — NaN, Infinity, 1.5, -3 and 0 pass the pool gate and render as repo#NaN-style fabricated references #3514): valid control passes; 1.5 / -3 / 0 / NaN / Infinity failisProjectPoolItemand drop individually inpoolFromFeed(2 survivors of 7).bun test test/feed.test.ts test/projects.test.ts— 74 pass, 0 fail.bun test: one fail (brief-surfacesrenders pool briefs) plus oneweb-pushpackage error — both reproduce on cleanorigin/main, pre-existing and unrelated.Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.